.class Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/WindowEvent;
.super Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidEvent;
.source "WindowEvent.java"


# static fields
.field static final EVENT_ID:I = 0x5

.field private static final VIEWABLE:Ljava/lang/String; = "viewable"


# direct methods
.method constructor <init>()V
    .locals 0

    .prologue
    .line 26
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidEvent;-><init>()V

    return-void
.end method

.method private onAttach(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;)V
    .locals 2
    .parameter "mraidView"

    .prologue
    .line 66
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->publishBridgeLoaded()V

    .line 67
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->startPositionNotification()V

    .line 69
    iget-boolean v1, p1, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->mPageLoaded:Z

    if-eqz v1, :cond_1

    .line 70
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 71
    .local v0, mapOfParams:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->isShown()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 72
    invoke-virtual {p1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->addViewableValue(Ljava/util/Map;)V

    .line 78
    :cond_0
    invoke-virtual {p1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->addCurrentPositionValue(Ljava/util/Map;)V

    .line 79
    invoke-virtual {p1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireComplexChangeEvent(Ljava/util/Map;)V

    .line 81
    .end local v0           #mapOfParams:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :cond_1
    return-void
.end method

.method private onDeattach(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;)V
    .locals 2
    .parameter "mraidView"

    .prologue
    .line 56
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->stopPositionNotification()V

    .line 57
    const-string v0, "viewable"

    const/4 v1, 0x0

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireSimpleChangeEvent(Ljava/lang/String;Ljava/lang/Object;)V

    .line 58
    return-void
.end method


# virtual methods
.method fireEvent(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;[Ljava/lang/Object;)V
    .locals 1
    .parameter "mraidView"
    .parameter "args"

    .prologue
    .line 39
    invoke-static {p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/WindowEvent;->checkArgs([Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 47
    :goto_0
    return-void

    .line 42
    :cond_0
    const/4 v0, 0x0

    aget-object v0, p2, v0

    check-cast v0, Ljava/lang/Boolean;

    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 43
    invoke-direct {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/WindowEvent;->onAttach(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;)V

    goto :goto_0

    .line 45
    :cond_1
    invoke-direct {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/WindowEvent;->onDeattach(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;)V

    goto :goto_0
.end method
